const { env } = require('./env')
const UPLOAD_PATH = env === 'dev' ?
  'C:/Users/10052/Desktop/admin-imooc-node/upload' :
  '/root/upload/book'
const UPLOAD_URL = env === 'dev' ?
  'C:/Users/10052/Desktop/admin-imooc-node/upload' :
  '/root/upload/book'

module.exports = {
  CODE_ERROR: -1,
  CODE_SUCCESS: 0,
  debug: true,
  PWD_SALT: 'admin_imooc_node',
  PRIVATE_KEY: 'admin_imooc_node_ayuan',
  JWT_EXPIRED: 60 * 60, // token失效时间
  CODE_TOKEN_EXPIRED: -2,
  UPLOAD_PATH,
  UPLOAD_URL,
  MIME_TYPE_EPUB: 'application/epub',
  UPDATE_TYPE_FROM_WEB: 0
}
